package com.mlog.njyjy.ndop.process.admin.service;

import com.mlog.njyjy.ndop.common.domain.NodeGroup;
import com.mlog.njyjy.ndop.process.admin.support.enums.NodeRelationType;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author zyz
 * @version v1.0, 2020/8/18
 */
public interface NodeGroupService {

    /**
     * 获取全部节点组
     *
     * @return
     */
    List<NodeGroup> findAll();

    /**
     * 返回节点组分组树结构
     *
     * @return
     */
    List<NodeGroup> treeData();

    /**
     * 返回指定父节点的树结构
     *
     * @param parentId
     * @return
     */
    List<NodeGroup> childrenTreeData(Long parentId);

    /**
     * 添加节点组
     *
     * @param baseNodeId
     * @param type
     * @param groupName
     * @return
     */
    boolean addNodeGroup(Long baseNodeId, NodeRelationType type, String groupName);

    /**
     * 删除节点组
     *
     * @param nodeGroupId
     * @return
     */
    boolean deleteNodeGroup(Long nodeGroupId);

    /**
     * 模糊查询
     *
     * @param input
     * @return
     */
    List<NodeGroup> freezeQueryByName(String input);

}
